<div class="al-modal-view">
  <div>
    <script type="text/javascript" src="http://cache.amap.com/lbs/static/addToolbar.js"></script>
    <div class="al-modal-title">选择地图位置</div>
    <div class="al-modal-form-container">
      <div style="position:relative;width:100%;height: 300px;margin-bottom: 20px">
        <div id="map-container"></div>
        <div id="myPageTop">
          <table>
            <tr>
              <td>
                <label>请输入关键字：</label>
              </td>
            </tr>
            <tr>
              <td>
                <input type="text" id="tipinput"/>
              </td>
            </tr>
          </table>
        </div>
      </div>
      <ng-form name="modalForm" class="form-horizontal form-validation" role="form">
        <div class="form-group" ng-show="type!='view' && result.name">
          <label class="col-sm-3 control-label">当前地址：</label>
          <div class="col-sm-6">
            <input class="form-control" ng-model="result.name" placeholder="请选择地址" disabled>
          </div>
        </div>
        <div class="form-group" ng-if="type!='view'">
          <div class="col-sm-3"></div>
          <div class="col-sm-3">
            <button class="al-center btn btn-default" ng-click="cancel()">取消</button>
          </div>
          <div class="col-sm-3">
            <button class="al-center btn btn-success" ng-click="confirm()">选择</button>
          </div>
          <div class="col-sm-3"></div>
        </div>
        <div class="form-group" ng-if="type=='view'">
          <div class="col-sm-4"></div>
          <div class="col-sm-4">
            <button class="al-center btn btn-default" ng-click="cancel()">返回</button>
          </div>
          <div class="col-sm-4"></div>
        </div>
    </div>
    <!--<script type="text/javascript">-->
      <!--//地图加载-->
      <!--var map = new AMap.Map("map-container", {-->
        <!--resizeEnable: true-->
      <!--});-->
      <!--//输入提示-->
      <!--var autoOptions = {-->
        <!--input: "tipinput"-->
      <!--};-->
      <!--var auto = new AMap.Autocomplete(autoOptions);-->
      <!--var placeSearch = new AMap.PlaceSearch({-->
        <!--map: map-->
      <!--});  //构造地点查询类-->
      <!--AMap.event.addListener(auto, "select", select);//注册监听，当选中某条记录时会触发-->
      <!--AMap.event.addListener(placeSearch,'markerClick',markerClick);-->
      <!--function select(e) {-->
        <!--console.log(JSON.stringify(e));-->
        <!--placeSearch.setCity(e.poi.adcode);-->
        <!--placeSearch.search(e.poi.name);  //关键字查询查询-->
      <!--}-->
      <!--function pickRes(status,result){-->
        <!--console.log(JSON.stringify(result));-->
      <!--}-->
      <!--function markerClick(e){-->
        <!--console.log(JSON.stringify(e));-->
      <!--}-->
      <!--window.onload = function() {-->
        <!--map.plugin(["AMap.ToolBar"], function () {-->
          <!--map.addControl(new AMap.ToolBar());-->
        <!--});-->
        <!--if (location.href.indexOf('&guide=1') !== -1) {-->
          <!--map.setStatus({scrollWheel: false})-->
        <!--}-->
      <!--}-->
    <!--</script>-->
  </div>
</div>